/**
 * 定义站点模块
 */
(function(window, angular, undefined){

	var module = angular.module('water.entity.bcSerial',['water.common.AJAXService']);
	
	module.service('$bcSerialService',function($AJAXService){
				
		/**
		 * 获取设备
		 */
		this.getList = function(){
			var promise = $AJAXService.post("/BCSerial/getList");
			return promise;
		}
		
		/**
		 * 新增设备
		 */
		this.create = function(model){
			var promise = $AJAXService.post("/BCSerial/create",model);
			return promise;
		}
		
		/**
		 * 修改设备
		 */
		this.update = function(model){
			var promise = $AJAXService.post("/BCSerial/update",model);
			return promise;
		}
		
		/**
		 * 删除设备
		 */
		this.deleteModel = function(id){
			var promise = $AJAXService.post("/BCSerial/delete",{id:id});
			return promise;
		}
		
		/**
		 * 获取协议列表
		 */
		this.getProtocolList = function(id){
			var promise = $AJAXService.post("/BCSerial/getProtocolList");
			return promise;
		}
		
	})
}(window, angular));